How to use isAccessInherited ?

Hi guys,

I want to check for every AttrDef in a Module if the access is inherited, so i tried to use the isAccessInherited function, but it get a incorrect arguments error
(-E- DXL: <Line:19> incorrect arguments for function (isAccessInherited))

Does someone know how to use this function?

Here's my code:

Project p = project "/NBT"
 
Item i
 
Module m
 
for i in p do
{
    if (type(i) == "Formal")
        {
                ModName_ tar = module(fullName i)
                ModuleVersion modver = moduleVersion(tar)
                Module m = load(modver, false)
 
                AttrDef ad
 
                for ad in m do
                {
                        if (isAccessInherited(ad) == false)
                        {
                                print fullName m "\n"
                        }
                } 
 
        }
}

ManuelFelger - Mon Jul 27 06:52:33 EDT 2009

Re: How to use isAccessInherited ?
SystemAdmin - Mon Jul 27 07:10:25 EDT 2009

In DXL Help there is a defintion of

string isAccessInherited{Def|Val}(Module m,
AttrDef ad,
bool &inherited)

meaning that for checking attribute definitions you have two functions: isAccessInheritedDef and isAccessInheritedVal. The "Def" one is for checking access rights to the attribute definition and "Val" one for checking access to the attribute value.

Re: How to use isAccessInherited ?
ManuelFelger - Mon Jul 27 08:53:01 EDT 2009

SystemAdmin - Mon Jul 27 07:10:25 EDT 2009
In DXL Help there is a defintion of

string isAccessInherited{Def|Val}(Module m,
AttrDef ad,
bool &inherited)

meaning that for checking attribute definitions you have two functions: isAccessInheritedDef and isAccessInheritedVal. The "Def" one is for checking access rights to the attribute definition and "Val" one for checking access to the attribute value.

Thank you!

Code:
 

bool isInherited
 
isAccessInheritedDef(m, ad, isInherited)

Re: How to use isAccessInherited ?
llandale - Mon Jul 27 14:04:28 EDT 2009

ManuelFelger - Mon Jul 27 08:53:01 EDT 2009

Thank you!

Code:
 

bool isInherited
 
isAccessInheritedDef(m, ad, isInherited)

Don't forget the isAccessInherited function returns a 'string' error message, checking if its null is inadequate. I think you can ignore the returned string:
isAccessInheritedDef(m, ad, IsInherit)
if (IsInherit) // IsInhertied
else // Specific access

Re: How to use isAccessInherited ?
SystemAdmin - Mon Mar 15 14:44:18 EDT 2010

llandale - Mon Jul 27 14:04:28 EDT 2009
Don't forget the isAccessInherited function returns a 'string' error message, checking if its null is inadequate. I think you can ignore the returned string:
isAccessInheritedDef(m, ad, IsInherit)
if (IsInherit) // IsInhertied
else // Specific access

This is for your information. The recommendations I saw were very helpful. Thanks.

Item i
Project p = current
for i in p do
{
    if(type(i) == "Formal")
        {
                bool(isInherit)
                {
                        isAccessInherited(i, isInherit)
                }
                
                        if(isInherit)
                        {
                                print "\t"name(i) " - It is inherited\n"
                                specific(i)                             
                        }
                                else
                                {
                                        print "\t"name(i) " - It is specific\n"
                                }
        }
                else
                {
                        print name(i) " is of type " type(i)"\n"
                }
}